home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / UNIX~1.ZIP / UNIX~1.HAC
Encoding:
Text File  |  1996-06-24  |  33.7 KB  |  905 lines

  1.  
  2.                   
  3.  
  4.          
  5.                                                                
  6.                        An Indepth Guide In Hacking UNIX           
  7.                                       and                         
  8.                     The Concept Of Basic Networking Utility       
  9.                                 By: Evil Ernie                    
  10.                                    Member of:                     
  11.                                     -=NLA=-                       
  12.                                No Lamerz Allowed                 
  13.         
  14.  
  15. Brief History On UNIX
  16. ~~~~~~~~~~~~~~~~~~~~~
  17. Its because of Ken Tompson that today we are able to hack Unix.  He used to
  18. work for Bell Labs in the 1960s.  Tompson started out using the MULTICS OS
  19. which was later eliminated and Tompson was left without an operating system to
  20. work with.
  21.  
  22. Tompson had to come up with something real quick. He did some research and and
  23. in 1969 UNIX came out, which was a single user and it did not have many
  24. capabilities.  A combined effort with others enabled him to rewrite the version
  25. in C and add some good features.  This version was released in 1973 and was
  26. made available to the public.  This was the first begining of UNIX in its
  27. presently known form.  The more refined version of UNIX, today know as UNIX
  28. system V developed by Berkley University has unique capabilities.
  29.  
  30. Various types of UNIXes are CPIX, Berkeley Ver 4.1, Berkeley 4.2, FOS, Genix,
  31. HP-UX, IS/I, OSx, PC-IX, PERPOS, Sys3, Ultrix, Zeus, Xenix, UNITY, VENIX, UTS,
  32. Unisys, Unip lus+, UNOS, Idris, QNIX, Coherent, Cromix, System III, System 7,
  33. Sixth edition.
  34.  
  35. The Article Itself
  36. ~~~~~~~~~~~~~~~~~~
  37. I believe that hacking into any system requires knowledge of the operating
  38. system itself.  Basically what I will try to do is make you more familiar with
  39. UNIX operation and its useful commands that will be advantageous to you as a
  40. hacker.  This article contains indepth explainations.  I have used the  UNIX
  41. System V to write this article.
  42.  
  43.  
  44. Error Messages:  (UNIX System V)
  45. ~~~~~~~~~~~~~~
  46. Login Incorrect - An invalid ID and/or password was entered.  This means
  47.                   nothing.  In UNIX there is no way guessing valid user IDs.
  48.                   You may come across this one when trying to get in.
  49.  
  50. No More Logins  - This happens when the system will not accept anymore logins.
  51.                   The system could be going down.
  52.  
  53. Unknown Id      - This happens if an invalid id is entered using (su) command.
  54.  
  55. Unexpected Eof In File - The file being stripped or the file has been damaged.
  56.  
  57. Your Password Has Expired - This is quite rare although there are situations
  58.                             where it can happen.  Reading the etc/passwd will
  59.                             show you at how many intervals it changes.
  60.  
  61. You May Not Change The Password - The password has not yet aged enough.  The
  62.                                   administrator set the quotas for the users.
  63.  
  64. Unknown Group (Group's Name) - Occurs when chgrp is executed, group does not
  65.                                exist.
  66. Sorry - Indicated that you have typed in an invalid super user password
  67.         (execution of the su).
  68.  
  69. Permission Denied! - Indicated you must be the owner or a super user to change
  70.                      password.
  71.  
  72. Sorry <( Of Weeks) Since Last Change - This will happen when password has has
  73.                                         not aged enough and you tried to change
  74.                                         it (password).
  75.  
  76. (Directory Name):  No Permission - You are trying to remove a directory which
  77.                                    you have no permission to.
  78.  
  79. (File Name) Not Removed - Trying to delete a file owned by another user that
  80.                           you do not have write permission for.
  81.  
  82. (Dirname) Not Removed - Ownership of the dir is not your that your trying to
  83.                         delete.
  84.  
  85. (Dirname) Not Empty - The directory contains files so you must have to delete
  86.                       the files before execcant open [file name] - defined
  87.                       wrong path, file name or you have no read permission.
  88.  
  89. Cp:  (File Name) And (File Name) Are Identical - Self explanatory.
  90.  
  91. Cannot Locate Parent Directory - Occurs when using mv.
  92.  
  93. (File name) Not Found - File which your trying to move does not exist.
  94.  
  95. You Have Mail - Self explanatory.
  96.  
  97.  
  98. Basic Networking Utility Error Messages
  99. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  100. Cu:  Not found         - Networking not installed.
  101. Login Failed           - Invalid id/pw or wrong number specified.
  102. Dial Failed            - The systen never answered due to a wrong number.
  103. UUCP Completely Failed - Did not specify file after -s.
  104. Wrong Time to Call     - You called at the time at a time not specified in the
  105.                          Systems file.
  106. System not in systems  - You called a remote not in the systems file.
  107.  
  108.  
  109. Logon Format
  110. ~~~~~~~~~~~~
  111. The first thing you must do is switch to lower case.  To identifing a UNIX,
  112. this is what you will see;
  113.  
  114. AT&T Unix System V 3.0 (eg of a system identifier)
  115.  
  116. login:
  117.  or
  118. Login:
  119.  
  120. Any of these is a UNIX.  Here is where you will have to guess at a user valid
  121. id.  Here are some that I have come across; glr, glt, radgo, rml, chester, cat,
  122. lom, cora, hlto, hwill, edcasey, and also some containing numbers; smith1,
  123. mitu6, or special characters in it; bremer$, jfox.  Login names have to be 3
  124. to 8 chracters in length, lowercase, and must start with a letter.  In some
  125. XENIX systems one may login as "guest"
  126.  
  127. User Level Accounts (Lower Case)
  128. ~~~~~~~~~~~~~~~~~~~
  129. In Unix there are what is called.  These accounts can be used at the "login:"
  130. prompt.  Here is a list:
  131.  
  132. sys      bin     trouble      daemon     uucp     nuucp      rje     lp     adm
  133.  
  134.  
  135. Super-User Accounts
  136. ~~~~~~~~~~~~~~~~~~~
  137. There is also a super-user login which make UNIX worth hacking.  The accounts
  138. are used for a specific job.  In large systems these logins are assingned to
  139. users who have a responsibilty to maintain subsystems.
  140.  
  141. They are as follows (all lower case);
  142.  
  143. root       -  This is a must the system comes configured with it. It has no
  144.               restriction.  It has power over every other account.
  145. unmountsys -  Unmounts files
  146. setup      -  System set up
  147. makefsys   -  Makes a new file
  148. sysadm     -  Allows useful S.A commands (doesn't need root login)
  149. powerdown  -  Powering system down
  150. mountfsys  -  Mounts files
  151. checkfsys  -  Checks file
  152.  
  153. These accounts will definitly have passwords assigned to them.  These accounts
  154. are also commands used by the system administrator.  After the login prompt you
  155. will receive a password prompt:
  156.  
  157. password:
  158.   or
  159. Password:
  160.  
  161. Enter the password (it will not echo).  The password rule is as follows; Each
  162. password has to contain at least 6 characters and maximum of 8 characters.  Two
  163. of which are to be alphabetic letters and at least one being a number or a
  164. special character.  The alphabetic digits could be in upper case or lower
  165. case.  Here are some of the passwords that I have seen; Ansuya1, PLAT00N6,
  166. uFo/78, ShAsHi.., Div417co.
  167.  
  168. The passwords for the super user accounts will be difficult to hack try the
  169. accounts interchangebly; login:sysadm password:makefsys, or rje1, sysop,
  170. sysop1, bin4, or they might contain letters, numbers, or special chracters in
  171. them.  It could be anything.  The user passwords are changed by an aging
  172. proccess at successive intervals.  The users are forced to changed it.  The
  173. super-user will pick a password that will not need changing for a long period
  174. of time.
  175.  
  176.  
  177. You Have Made It!
  178. ~~~~~~~~~~~~~~~~~
  179. The hard part is over and hopefully you have hacked a super-user account.
  180. Remember Control-d stops a process and also logs you off.  The next thing you
  181. will probably see is the system news.  Ex;
  182.  
  183. login:john
  184. password:hacker1
  185.  
  186. System news
  187.  
  188. There will be no networking offered to the users till
  189. August 15, due to hardware problems.
  190. (Just An Example)
  191.  
  192. $
  193.  
  194. $ (this is the Unix prompt) - Waiting for a command to be entered.
  195.  - Means your logged in as root (Very Good).
  196.  
  197. A Word About The XENIX System III (Run On The Tandy 6000)
  198. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  199. The largest weakness in the XENIX System III occurs after the installation
  200. of the Profile-16 or more commonly know as the Filepro-16.  I have seen the
  201. Filepro-16 installed in many systems.  The installation process creates an
  202. entry in the password file for a user named \fBprofile\fR, an account that who
  203. owns and administors the database.  The great thing about it is that when the
  204. account is created, no password is assigned to it.  The database contains
  205. executable to maintain it.  The database creation programs perform a
  206. \fBsetuid\fR to boot up the \fBoot\fR  thereby giving a person the whole C
  207. Shell to gain Super User privilege same as root.  Intresting huh!
  208.  
  209. (* Note:  First the article will inform you of how the Unix is made up.)
  210.  
  211.  
  212. The Unix is made if three components - The Shell, The Kernal, File System.
  213.  
  214. The Kernal
  215. ~~~~~~~~~~
  216. You could say that the kernal is the heart of the Unix operating system. The
  217. kernal is a low level language lower than the shell which maintains processes.
  218. The kernal handles memory usage, maintains file system the sofware and hardware
  219. devices.
  220.  
  221. The Shell
  222. ~~~~~~~~~
  223. The shell a higher level language.  The shell had two important uses, to act as
  224. command interpreture for example using commands like cat or who.  The shell is
  225. at work figuring out whether you have entered a command correctly or not.  The
  226. second most important reason for the shell is its ability to be used as
  227. programing language.  Suppose your performing some tasks repeatedly over and
  228. over again, you can program the shell to do this for you.
  229.  
  230.             (Note:  This article will not cover shell programming.)
  231.             (       Instead B.N.N will be covered.                )
  232.  
  233.  
  234. The File System
  235. ~~~~~~~~~~~~~~~
  236. The file system in Unix is divided into 3 catagories:  Directories, ordinary
  237. files and special files (d,-).
  238.  
  239. Basic Stucture:
  240.  
  241. (/)-this is abreviation for the root dirctory.
  242.  
  243.   root level                      root
  244.                                   (/)                                  system
  245. -------------------------------------|---------------------------------- level
  246. |      |        |         |                  |        |       |        |
  247. /unix  /etc     /dev      /tmp               /lib     /usr    /usr2    /bin
  248.        |                                         _____|_____
  249. login passwd                                     |    |    |
  250. level                                            /john  /cathy
  251.                               ________________________|_______________
  252.                              |        |     |      |        |        |
  253.                          .profile   /mail  /pers  /games   /bin     /michelle
  254. *.profile - in case you                    |    __|______  |      __|_______
  255. wish to change your environment, but    capital |        | data   | |       |
  256. after you log off, it sets it to              othello  starwars letter letter1
  257. default.
  258.  
  259. /unix - This is the kernal.
  260. /etc  - Contains system administrators files,Most are not available to the
  261.         regular user (this dirrctory contains the /passwd file).
  262.  
  263.     Here are some files under /etc directory:
  264.     /etc/passwd
  265.     /etc/utmp
  266.     /etc/adm/sulog
  267.     /etc/motd
  268.     /etc/group
  269.     /etc/conf
  270.     /etc/profile
  271.  
  272. /dev - contains files for physical devices such as printer and the disk drives
  273. /tmp - temporary file directory
  274. /lib - dirctory that contains programs for high level languages
  275. /usr - this directory contains dirctories for each user on the system
  276. /bin - contain executable programs (commands)
  277.  
  278. The root also contains:
  279. /bck - used to mount a back up file system.
  280. /install - Used to install and remove utilities
  281. /lost+found - This is where all the removed files go, this dir is used by fsck
  282. /save -A utility used to save data
  283. /mnt - Used for temporary mounting
  284.  
  285. **Now the fun part scouting around**
  286.  
  287. Local Commands (Explained In Details)
  288. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  289. At the unix prompt type the pwd command.  It will show you the current working
  290. directory you are in.
  291.  
  292. $ pwd
  293. $ /usr/admin - assuming that you have hacked into a super user account
  294.                check fsys
  295. $
  296.  
  297. This gives you the full login directory.  The / before tell you the location of
  298. the root directory.
  299.  
  300. Or
  301.  
  302. (REFER TO THE DIAGRAM ABOVE)
  303. $ pwd
  304. $ /usr/john
  305. $
  306. Assuming you have hacked into John's account.
  307.  
  308. Lets say you wanted to move down to the Michelle directory that contains
  309. letters.  You would type in;
  310.  
  311. $ cd michelle or cd usr/john/michelle
  312. $ pwd
  313. $ /usr/john/michelle
  314. $
  315.  
  316. Going back one directory up type in:
  317. $ cd ..
  318. or going to your parent directory just type in "cd"
  319.  
  320. Listing file directories assuming you have just logged in:
  321. $ ls /usr/john
  322. mail
  323. pers
  324. games
  325. bin
  326. michelle
  327. This wont give you the .profile file.  To view it type
  328. $ cd
  329. $ ls -a
  330. :
  331. :
  332. .profile
  333.  
  334. To list file names in Michelle's directory type in:
  335. $ ls michelle (that if your in the johns directory)
  336. $ ls /usr/john/michelle(parent dir)
  337.  
  338. ls -l
  339. ~~~~~
  340. The ls -l is an an important command in unix.This command displays the whole
  341. directory in long format :Run this in parent directory.
  342. $ ls -l
  343. total 60
  344. -rwxr-x---    5 john      bluebox    10 april 9  7:04  mail
  345. drwx------    7 john      bluebox    30 april 2  4:09  pers
  346.      :            :         :         :     :      :    :
  347.      :            :         :         :     :      :    :
  348. -rwxr-x---     6 cathy    bluebox    13 april 1  13:00 partys
  349.      :            :         :         :     :      :    :
  350. $
  351.  
  352. The total 60 tells one the ammount of disk space used in a directory.  The
  353. -rwxr-x--- is read in triples of 3.  The first chracter eg (-, d, b, c) means
  354. as follows:  - is an ordinary file, d is a directory, b is block file, c is a
  355. character file.
  356.  
  357. The r stands for read permission, w is write permission, x is execute. The
  358. first column is read in 3 triples as stated above.  The first group of 3 (in
  359. -rwxr-x---) after the "-" specifies the permission for the owner of the file,
  360. the second triple are for the groups (the fourth column) and the last triple
  361. are the permissions for all other users.  Therefore, the -rwxr-x--- is read as
  362. follows.
  363.  
  364. The owner, John, has permission to read, write, and execute anything in the bin
  365. directory but the group has no write permission to it and the rest of the users
  366. have no permission at all.  The format of one of the lines in the above output
  367. is as follows:
  368.  
  369. file type-permissions, links, user's name, group, bytes taken, date, time when
  370. last renued, directory, or file name.
  371.  
  372.                *** You will be able to read, execute Cathy's ***
  373.                *** file named partly due to the same group.  ***
  374.  
  375. Chmod
  376. ~~~~~
  377. The chmod command changes permission of a directory or a file.  Format is
  378. chmod who+, -, =r , w, x
  379.  
  380. The who is substituted by u-user, g-group, o-other users, a-all.
  381. The + means add permission, - means remove permission, = - assign.
  382. Example:  If you wanted all other users to read the file name mail, type:
  383.  
  384. $ chmod o+r mail
  385.  
  386. Cat
  387. ~~~
  388. Now suppose you wanted to read the file letter.  There are two ways to doing
  389. this.  First go to the michelle directory then type in:
  390.  
  391. $ cat letter
  392. line one ...\
  393. line two ... }the output of letter
  394. line three../
  395. $
  396.    or
  397. If you are in the parent directory type in:
  398. $ cat /usr/john/michelle/letter
  399. and you will have the same output.
  400.  
  401. Some cat options are  -s, -u, -v, -e, -t
  402.  
  403. Special Chracters in Unix
  404. ~~~~~~~~~~~~~~~~~~~~~~~~~
  405. *      - Matches any number of single characters eg. ls john* will list all
  406.          files that begin with john
  407. [...]  - Matchs any one of the chracter in the [ ]
  408. ?      - Matches any single chracter
  409. &      - Runs a process in the backgroung leaving your terminal free
  410. $      - Values used for variables also $n - null argument
  411. >      - Redirectes output
  412. <      - Redirects input to come from a file
  413. >>     - Redirects command to be added to the end of a file
  414. |      - Pipe output (eg:who|wc-l tells us how many users are online)
  415. "..."  - Turn of meaning of special chracters excluding $,`
  416. `...`  - Allows command output in to be used in a command line
  417. '...'  - Turns of special meaning of all chracters
  418.  
  419. Continuation Of Local Commands
  420. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  421. man [command] or [c/r] -will give you a list of commands explainations
  422. help - available on some UNIX systems
  423. mkdir [dir name(s)] - makes a directory
  424. rmdir [dir name(s)] - removes directory.You wont be able to remove the
  425.                       directory if it contains files in them
  426. rm [file name(s)] - removes files. rm * will erase all files in the current
  427.                     dir.  Be carefull you!  Some options are:
  428.                     [-f unconditional removal] [-i Prompts user for y or n]
  429.  
  430. ps [-a all processes except group leaders] [-e all processes] [-f the whole
  431.    list]  - This command reports processes you are running eg:
  432.  
  433.    $ps
  434.    PID   TTY  TIME   COMMAND
  435.    200   tty09 14:20  ps
  436.  
  437.    The systems reports (PID - process idenetification number which is a number
  438.    from 1-30,000 assigned to UNIX processes)
  439.    It also reports the TTY,TIME and the COMMAND being executed at the time.
  440.    To stop a process enter :
  441.  
  442.    $kill [PID] (this case its 200)
  443.    200 terminated
  444.    $
  445.  
  446. grep (argument) - searches for an file that contains the argument
  447. mv (file names(s)) ( dir name ) - renames a file or moves it to another
  448.                                   directory
  449. cp [file name] [file name] - makes a copy of a file
  450. write [login name ] - to write to other logged in users.  Sort of a chat
  451. mesg [-n] [-y] - doesn't allow others to send you messages using the write
  452.                  command.  Wall used by system adm overrides it.
  453. $ [file name] - to execute any file
  454. wc [file name] - Counts words, characters,lines in a file
  455. stty [modes] - Set terminal I/O for the current devices
  456. sort [filename] - Sorts and merges files many options
  457. spell [file name] > [file name] - The second file is where the misspelt words
  458.                                   are entered
  459. date [+%m%d%y*] [+%H%%M%S] - Displays date acoording to options
  460. at [-r] [-l] [job] - Does a specified job at a specified time.  The -r Removes
  461.                      all previously scheduled jobs.The -l reports the job  and
  462.                      status of all jobs scheduled
  463. write [login] [tty] - Sends message to the login name.  Chat!
  464.  
  465.  
  466. Su [login name]
  467. ~~~~~~~~~~~~~~~
  468. The su command allows one to switch user to a super user to a user.  Very
  469. important could be used to switch to super user accounts.
  470. Usage:
  471.  
  472. $ su sysadm
  473. password:
  474.  
  475. This su command will be monitored in /usr/adm/sulog and this file of all files
  476. is carefully monitered by the system administrator.Suppose you hacked in john's
  477. account and then switched to the sysadm account (ABOVE) your /usr/adm/su log
  478. entry would look like:
  479.  
  480. SU  04/19/88  21:00 + tty 12 john-sysadm
  481.  
  482. Therfore the S.A(system administrator) would know that john swithed to sysadm
  483. account on 4/19/88 at 21:00 hours
  484.  
  485.  
  486. Searching For Valid Login Names:
  487. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  488. Type in-
  489. $ who  ( command informs the user of other users on the system)
  490. cathy  tty1  april 19  2:30
  491. john   tty2  april 19  2:19
  492. dipal  tty3  april 19  2:31
  493. :
  494. :
  495. tty is the user's terminal, date, time each logged on.  mary, dr.m are valid
  496. logins.
  497.  
  498. Files worth concatenating(cat)
  499.  
  500.  
  501. /etc/passwd file
  502. ~~~~~~~~~~~~~~~~
  503. The etc/passwd is a vital file to cat.  For it contains login names of all
  504. users including super user accounts and there passwords.  In the newer SVR3
  505. releases they are tighting their security by moving the encrypted passwords
  506. from /etc/passwd to /etc/shadow making it only readable by root.
  507. This is optional of course.
  508.  
  509. $ cat /etc/passwd
  510. root:D943/sys34:0:1:0000:/:
  511. sysadm:k54doPerate:0:0:administration:usr/admin:/bin/rsh
  512. checkfsys:Locked;:0:0:check file system:/usr/admin:/bin/rsh
  513. :
  514. other super user accs.
  515. :
  516. john:hacker1:34:3:john scezerend:/usr/john:
  517. :
  518. other users
  519. :
  520. $
  521.  
  522. If you have reached this far capture this file as soon as possible.  This is a
  523. typical output etc/passwd file.  The entries are seperated by a ":".  There
  524. made be up to 7 fields in each line.
  525. Eg.sysadm account.
  526.  
  527. The first is the login name in this case sysadm.The second field contains the
  528. password.  The third field contains the user id."0 is the root."  Then comes
  529. the group id then the account which contains the user full name etc.  The sixth
  530. field is the login directory defines the full path name of the the paticular
  531. account and the last is the program to be executed.  Now one can switch to
  532. other super user account using su command descibed above.  The password entry
  533. in the field of the checkfsys account in the above example is "Locked;". This
  534. doesn't mean thats its a password but the account checkfsys cannot be accessed
  535. remotely.  The ";" acts as an unused encryption character.  A space is also
  536. used for the same purpose.  You will find this in many UNIX systems that are
  537. small systems where the system administrator handles all maintaince.
  538.  
  539. If the shawdowing is active the /etc/passwd would look like this:
  540.  
  541. root:x:0:1:0000:/:
  542. sysadm:x:0:0:administration:/usr/admin:/bin/rsh
  543.  
  544. The password filed is substituted by "x".
  545.  
  546. The /etc/shawdow file only readable by root will look similar to this:
  547.  
  548. root:D943/sys34:5288::
  549. :
  550. super user accounts
  551. :
  552. Cathy:masai1:5055:7:120
  553. :
  554. all other users
  555. :
  556.  
  557. The first field contains users id:  The second contains the password (The pw
  558. will be NONE if logining in remotely is deactivated):  The third contains a
  559. code of when the password was last changed:  The fourth and the fifth contains
  560. the minimum and the maximum numbers of days for pw changes (its rare that you
  561. will find this in the super user logins due to there hard to guess passwords)
  562.  
  563.  
  564. /etc/options
  565. ~~~~~~~~~~~~
  566. The etc/options file informs one the utilities available in the system.
  567. -rwxr-xr-x   1 root  sys   40 april  1:00  Basic Networking utility
  568.  
  569.  
  570. /etc/group
  571. ~~~~~~~~~~
  572. The file has each group on the system.  Each line will have 4 entries separated
  573. by a ":".   Example of concatenated /etc/group:
  574.  
  575. root::0:root
  576. adm::2:adm,root
  577. bluebox::70:
  578.  
  579. Group name:password:group id:login names
  580. ** It very unlikely that groups will have passwords assigned to them **
  581. The id "0" is assigned to /
  582.  
  583.  
  584. Sending And Recieving Messages
  585. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  586. Two programs are used to manage this.  They are mail & mailx.  The difference
  587. between them is that mailx is more fancier thereby giving you many choices like
  588. replying message, using editors, etc.
  589.  
  590.  
  591. Sending
  592. ~~~~~~~
  593. The basic format for using this command is:
  594.  
  595. $mail [login(s)]
  596. (now one would enter the text after finishing enter "." a period on the next
  597. blank line)
  598. $
  599.  
  600. This command is also used to send mail to remote systems.  Suppose you wanted
  601. to send mail to john on a remote called ATT01 you would type in:
  602.  
  603. $mail ATT01!john
  604.  
  605. Mail can be sent to several users, just by entering more login name after
  606. issuing the mail command
  607.  
  608. Using mailx is the same format:(This I'll describe very briefly) $mailx john
  609. subject:(this lets you enter the subject)
  610. (line 1)
  611. (line 2)
  612. (After you finish enter (~.) not the brackets of course, more commands are
  613. available like ~p, ~r, ~v, ~m, ~h, ~b, etc.).
  614.  
  615.  
  616. Receiving
  617. ~~~~~~~~~
  618. After you log on to the system you will the account may have mail waiting.
  619. You will be notified "you have mail."
  620. To read this enter:
  621. $mail
  622. (line 1)
  623. (line 2)
  624. (line 3)
  625. ?
  626. $
  627.  
  628. After the message you will be prompted with a question mark.  Here you have a
  629. choice to delete it by entering d, saving it to view it later s, or just press
  630. enter to view the next message.
  631.  
  632.               (DON'T BE A SAVANT AND DELETE THE POOR GUY'S MAIL)
  633.  
  634.  
  635. Super User Commands
  636. ~~~~~~~~~~~~~~~~~~~
  637. $sysadm adduser - will take you through a routine to add a user (may not last
  638.                   long)
  639.  
  640. Enter this:
  641.  
  642. $ sysadm adduser
  643. password:
  644. (this is what you will see)
  645.  /--------------------------------------------------------------------------\
  646.   Process running succommmand `adduser`
  647.   USER MANAGMENT
  648.  
  649.   Anytime you want to quit, type "q".
  650.   If you are not sure how to answer any prompt, type "?" for help
  651.  
  652.   If a default appears in the question, press <RETURN> for the default.
  653.  
  654.   Enter users full name [?,q]: (enter the name you want)
  655.   Enter users login ID [?,q]:(the id you want to use)
  656.   Enter users ID number (default 50000) [?,q) [?,q]:( press return )
  657.   Enter group ID number or group name:(any name from /etc/group)
  658.   Enter users login home directory:(enter /usr/name)
  659.  
  660.   This is the information for the new login:
  661.   Users name: (name)
  662.   login ID:(id)
  663.   users ID:50000
  664.   group ID or name:
  665.   home directory:/usr/name
  666.   Do you want to install, edit, skip [i, e, s, q]? (enter your choice if "i"
  667.   then)
  668.  Login installed
  669.  Do you want to give the user a password?[y,n] (its better to enter one)
  670.  New password:
  671.  Re-enter password:
  672.  
  673.  Do you want to add another login?
  674. \----------------------------------------------------------------------------/
  675.  
  676. This is the proccess to add a user.  Since you hacked into a super user account
  677. you can make a super user account by doing the following by entering 0 as an
  678. user and a group ID and enter the home directory as /usr/admin.  This will give
  679. you as much access as the account sysadm.
  680.  
  681. **Caution** - Do not use login names like Hacker, Cracker,Phreak etc.  This is
  682. a total give away.
  683.  
  684. The process of adding a user wont last very long the S.A will know when he
  685. checks out the /etc/passwd file
  686.  
  687. $sysadm moduser - This utility allows one to modify users.  DO NOT ABUSE!!
  688. !
  689.  
  690. Password:
  691.  
  692. This is what you'll see:
  693.  
  694. /----------------------------------------------------------------------------\
  695. MODIFYING USER'S LOGIN
  696.  
  697. 1)chgloginid  (This is to change the login ID)
  698. 2)chgpassword (Changing password)
  699. 3)chgshell (Changing directory DEFAULT = /bin/sh)
  700.  
  701. ENTER A NUMBER,NAME,INITIAL PART OF OF NAME,OR ? OR <NUMBER>? FOR HELP, Q TO
  702. QUIT ?
  703. \----------------------------------------------------------------------------/
  704.  
  705. Try every one of them out.Do not change someones password.It creates a havoc.
  706. If you do decide to change it.Please write the original one down somewhere
  707. and change back.Try not to leave to many traces after you had your fun.  In
  708. choice number 1 you will be asked for the login and then the new one.  In
  709. choice number 2 you will asked for the login and then supplied by it correct
  710. password and enter a new one.  In choice 3 this is used to a pchange the login
  711. shell ** Use full **  The above utilites can be used separatly for eg (To
  712. change a password one could enter: $sysadm chgpasswd not chapassword, The rest
  713. are same)
  714.  
  715. $sysadm deluser - This is an obviously to delete a user password:
  716.  
  717. This will be the screen output:
  718. /---------------------------------------------------------------------------\
  719. Running subcommand 'deluser' from menu 'usermgmt'
  720. USER MANAGEMENT
  721.  
  722. This fuction completely removes the user,their mail file,home directory and all
  723. files below their home directory from the machine.
  724.  
  725. Enter login ID you wish to remove[q]:      (eg.cathy)
  726. 'cathy' belongs to 'Cathy Franklin'
  727. whose home directory is /usr/cathy
  728. Do you want to remove this login ID 'cathy' ? [y,n,?,q] :
  729.  
  730. /usr/cathy and all files under it have been deleted.
  731.  
  732. Enter login ID you wish to remove [q]:
  733. \--------------------------------------------------------------------------/
  734. This command deletes everthing owned by the user.Again this would be stupid to
  735. use.
  736.  
  737.  
  738. Other Super User Commands
  739. ~~~~~~~~~~~~~~~~~~~~~~~~~
  740. wall [text] control-d  - to send an anouncement to users logged in (will
  741.                          override mesg -n command).  Execute only from /
  742. /etc/newgrp - is used to become a member of a group
  743.  
  744. sysadm [program name]
  745.         delgroup - delets groups
  746.         diskuse - Shows free space etc.
  747.         whoson - self explanatory
  748.         lsgroup - Lists group
  749.         mklineset -hunts various sequences
  750.  
  751.  
  752.                         Basic Networking Unility (BNU)
  753.                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  754.  
  755. The BNU is a unique feature in UNIX.Some systems may not have this installed.
  756. What BNU does is allow other remote UNIXes communicate with yours without
  757. logging off the present one.BNU also allowes file transfer between computers.
  758. Most UNIX systems V will have this feature installed.
  759.  
  760. The user program like cu,uux etc are located in the /usr/bin directory
  761.  
  762. Basic Networking Files
  763. ~~~~~~~~~~~~~~~~~~~~~~
  764. /usr/lib/uucp/[file name]
  765.  [file name]
  766.  systems - cu command to establishes link.Contains info on remote computers
  767.            name, time it can be reached, login Id, password, telephone numbers
  768.  devices - inter connected with systems files (Automatic call unit same in two
  769.            entries) also contains baud rate, port tty1, etc.
  770.  
  771.  dialers - where asscii converation must be made before file tranfers etc.
  772.  dialcodes - contains abreiviations for phone numbers that can be used in
  773.              systems file
  774.  
  775. other files are sysfiles, permissions, poll, devconfig
  776.  
  777. Logining On To Remote And Sending+Receiving Files
  778. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  779.  cu - This command allows one to log on to the local as well as the remote Unix
  780.       (or a non unix)without haveing to hang up so you can transfer files.
  781.       Usage:[options]
  782.  
  783.   $ cu [-s baud rate][-o odd parity][-e even parity][-l name of comm line]
  784.        telephone number | systemname
  785.  
  786.   To view system names that you can communicate with use the 'unname' command:
  787.   Eg. of output of names:
  788.  
  789.   ATT01
  790.   ATT02
  791.   ATT03
  792.   ATT04
  793.  
  794.  
  795. $ cu -s300 3=9872344 (9872344 is the tel)
  796.  connected
  797.  login:
  798.  password:
  799.  
  800. Local Strings
  801. ~~~~~~~~~~~~~
  802. <~.> - will log you off the remote terminal, but not the local
  803. <control-d> - puts you back on the remote unix local (the directory which you
  804.               are in)
  805. "%put [file name] - reverse of above
  806.  
  807. Ct
  808. ~~
  809. ct allows local to connect to remote.Initiates a getty on a remote terminal.
  810. Usefull when using a remote terminal.BNU has call back feature that allows the
  811. user on the remote who can execute a call back meaning the local can call the
  812. remote.[   ] are options
  813.  
  814. $ ct [-h prevent automatic hang up][-s bps rate][-wt set a time to call back
  815.      abbrieviated t mins] telephone number
  816.  
  817. Uux
  818. ~~~
  819. To execute commands on a remote (unix to unix)
  820. usage:[  ] are options
  821.  
  822. $ uux [- use standard output][-n prevent mail notification][-p also use
  823.       standard output] command-string
  824.  
  825. UUCP
  826. ~~~~
  827. UUCP copies files from ones computer to the home directory of a user in remote
  828. system.  This also works when copying files from one directory to another in
  829. the remote.  The remote user will be notified by mail.  This command becomes
  830. use full when copying files from a remote to your local system.  The UUCP
  831. requires the uucico daemon will call up the remote and will perform file login
  832. sequence, file transfer, and notify the user by mail.  Daemons are programs
  833. runining in the background.  The 3 daemons in a Unix are uucico, uusched,
  834. uuxqt.
  835.  
  836. Daemons Explained:  [nows a good time to explain the 3 daemons]
  837. ~~~~~~~~~~~~~~~~~
  838. Uuxqt - Remote execution.  This daemon is executed by uudemon.hour started by
  839.         cron.UUXQT searchs in the spool directory for executable file named
  840.         X.file sent from the remote system.  When it finds a file X .file where
  841.         it obtains process which are to be executed.  The next step is to find
  842.         weather the processes are available at the time.The if available it
  843.         checks permission and if everthing is o.k it proceeds the background
  844.         proccess.
  845.  
  846. Uucico - This Daemon is very immportant for it is responsible in establishing
  847.          a connection to the remote also checks permission, performs login
  848.          procedures,transfers + executes files and also notifies the user by
  849.          mail.  This daemon is called upon by uucp,uuto,uux commands.
  850.  
  851. Uusched - This is executed by the shell script called uudemon.hour.  This
  852.           daemons acts as a randomizer before the UUCICO daemon is called.
  853.  
  854.  
  855. Usage:
  856.  
  857. $ uucp [options] [first full path name!] file [destination path!] file example:
  858.  
  859. $ uucp -m -s bbss hackers unix2!/usr/todd/hackers
  860.  
  861. What this would do is send the file hackers from your computer to the remotes
  862. /usr/todd/hackers making hackers of course as file.  Todd would mail that a
  863. file has been sent to him.  The Unix2 is the name of the remote.  Options for
  864. UUCP:  (Don't forget to type in remotes name Unix2 in case)
  865. -c  dont copy files to spool directory
  866. -C  copy to spool
  867. -s[file name] - this file will contain the file status(above is bbss)
  868. -r  Dont start the comm program(uucico) yet
  869. -j  print job number(for above eg.unix2e9o3)
  870. -m  send mail when file file is complete
  871.  
  872. Now suppose you wanted to receive file called kenya which is in the
  873. usr/ dan/usa to your home directory /usr/john assuming that the local systems
  874. name is ATT01 and you are currently working in /usr/dan/usa,you would type in:
  875.  
  876. $uucp kenya ATT01!/usr/john/kenya
  877.  
  878. Uuto
  879. ~~~~
  880. The uuto command allows one to send file to remote user and can also be used to
  881. send files locally.
  882.  
  883. Usage:
  884.  
  885. $ uuto [file name] [system!login name]( omit systen name if local)
  886.  
  887.  
  888. Conclusion
  889. ~~~~~~~~~~
  890. Theres always more one can say about the UNIX, but its time to stop.  I hope
  891. you have enjoyed the article.  I apologize for the length.  I hope I made the
  892. UNIX operating system more familiar.  The contents of the article are all
  893. accurate to my knowledge.  Hacking into any system is illegal so try to use
  894. remote dial-ups to the job.  Remember do not abuse any systems you hack into
  895. for a true hacker doesn't like to wreck, but to learn.
  896.  
  897.   
  898.  
  899.                                   Evil Ernie
  900.                                    -=NLA=-
  901.                                No Lamerz Allowed
  902. ==============================================================================
  903.  
  904.  
  905.